<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCruiseOrderProcessV2Table extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cruise_order_process_v2', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('cruiseOrderId')->default(0)->comment('cruise_order.id');
            $table->tinyInteger('cruiseOrderStatus')->default(0)->comment('cruise_order.status对应当时的阶段');
            $table->tinyInteger('type')->default(0)->comment('1同意 2驳回');
            $table->string('content')->default('')->comment('评价内容');
            $table->json('details')->default('')->comment('明细json');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = 'cruise_order的日志表v2';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cruise_order_process_v2');
    }
}
